@import 'variables';
@import 'mixins';

$w_arrow: 12px;
$w: 1000px;

.modal-share {
  z-index: 10000;
  position: fixed;
  top: 50px;
  left: 0;
  right: 0;

  .modal-history-container {
    max-width: $w;
    margin: 0 auto;
    background: white;
  }

  @include transition(all $spring-transition-duration);
  &:before {
    $h: 60px;
    content: ' ';
    height: $h;
    width: $w;
    position: absolute;
    bottom: -$h;
    left: 0;
  }
  .modal-content {
    padding: $spring-8points * 3;
    padding-top: $spring-8points;
    padding-bottom: $spring-8points * 2;
    max-height: 70vh;
    overflow: auto;
    .list {
      .date {
        font-weight: bold;
        padding: 10px 0 5px;
      }
      ul {
        padding: 0;
        margin: 0 0 10px;
      }
      li {
        list-style: none;
        padding: 1px 0;
        margin: 0;
        position: relative;
      }
      a.item {
        position: relative;
        background: $light-background-seconday;
        border-radius: 3px;
        display: flex;
        text-decoration: none;
        padding: 5px 10px;
        color: $light-color;
        padding-right: 60px;
        &:hover {
          background: lighten($light-background-seconday, 2);
          a {
            opacity: 1;
          }
        }
      }
      .time {
        width: 80px;
      }
      .time,
      .desc,
      .main,
      .deps {
        display: block;
      }
    }
    button.favorite {
      $size: 42px;
      display: block;
      position: absolute;
      width: $size;
      right: 10px;
      top: 50%;
      margin-top: -(calc($size / 2)-4);
      border: 0 none;
      cursor: pointer;
      background: transparent;
      opacity: 0.4;
      @include outline;
      @include transition(all 150ms);
      .a-content {
        display: block;
        outline: none;
        box-shadow: none;
        padding: 8px;
      }
      svg {
        display: block;
      }
      &:hover {
        opacity: 0.8;
      }
      &:focus {
        opacity: 1;
      }
    }
  }
  .modal-header {
    position: relative;
    padding: 6px $spring-8points * 2 2px;
    border-bottom: 1px solid #ebebeb;
    h1 {
      font-size: $spring-8points * 2.5;
      line-height: $spring-8points * 2.5;
      font-weight: 600;
    }
    .button {
      position: absolute;
      top: 11px;
      right: 11px;
      font-size: $spring-font-size - 3;
      line-height: 0.7rem;
      margin-right: 0;
    }
  }
  .modal-action {
    text-align: center;
    border-top: 1px solid $light-border;
    padding: 16px 0 8px;
  }
}

.modal-enter {
  opacity: 0;
}

.modal-enter-active {
  opacity: 1;
  transition: all 300ms;
}

.modal-exit {
  opacity: 1;
}

.modal-exit-active {
  opacity: 0;
  transition: all 300ms;
}

@import 'responsive';
